From a2b0be52481960535db8749d3a148194aa749628 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Thu, 7 Dec 2006 12:11:40 +0000 Subject: [PATCH] Do an explicit check for bootloader path existence prior to the one for executable permissions. Also print out the path being tested. Signed-off-by: Daniel P, Berrange --- tools/python/xen/xm/create.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py index c081560f8e..aa0c03cac3 100644 --- a/tools/python/xen/xm/create.py +++ b/tools/python/xen/xm/create.py @@ -704,8 +704,10 @@ def configure_hvm(config_image, vals): config_image.append(['vncpasswd', vals.vncpasswd]) def run_bootloader(vals, config_image): + if not os.access(vals.bootloader, os.F_OK): + err("Bootloader '%s' does not exist" % vals.bootloader) if not os.access(vals.bootloader, os.X_OK): - err("Bootloader isn't executable") + err("Bootloader '%s' isn't executable" % vals.bootloader) if len(vals.disk) < 1: err("No disks configured and boot loader requested") (uname, dev, mode, backend) = vals.disk[0] -- 2.30.2